package others.swing.p016;

public class Book {
    public String ISBN;
    String bookNo;
    String bookName;
    private String author;
    private String publisher;
    private String price;


    //定义构造方法，对对象初始化
    Book(String isbn, String bname, String bauthor, String bpublisher, String bprice, String bno) {
        bookNo = bno;
        ISBN = isbn;
        bookName = bname;
        author = bauthor;
        publisher = bpublisher;
        price = bprice;
    }

    public String getbookNo() {
        return bookNo;
    }

    //获取书号
    public String getISBN() {
        return ISBN;
    }

    //获取书名
    public String getBookName() {
        return bookName;
    }

    //修改作者
    public void setAuthor(String newauthor) {
        author = newauthor;
    }

    public String getAuthor() {
        return author;
    }

    //修改出版社
    public void setPublisher(String newpublisher) {
        publisher = newpublisher;
    }

    //获取出版社
    public String getPublisher() {
        return publisher;
    }

    //修改书价
    public void setPrice(String newprice) {
        price = newprice;
    }

    //获取书价
    public String getPrice() {
        return price;
    }
}
